﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IdentityServer4;
using IdentityServer4.Models;

namespace AVISOutBound.SSOServer.Web.Models.IdentityConfig
{
    public class CreateClientModel
    {
        public string ClientId { get; set; }
        public string ClientName { get; set; }
        /// <summary>
        /// 参见<see cref="IdentityServer4.Models.GrantTypes"/>,一般情况均使用<see cref="GrantType.Hybrid"/>
        /// </summary>
        public List<string> GrantTypes { get; set; }
        /// <summary>
        /// 加密之前的secret,简单起见,只使用一个secret
        /// </summary>
        public string ClientSecret { get; set; }
        /// <summary>
        /// 合法的登陆回调地址列表
        /// </summary>
        public List<string> RedirectUris { get; set; }
        /// <summary>
        /// 注销回调地址
        /// </summary>
        public List<string> PostLogoutRedirectUris { get; set; }
        /// <summary>
        /// 可选项包含<see cref="IdentityServerConstants.StandardScopes"/>以及需要访问的api的scope
        /// </summary>
        public List<string> AllowedScopes { get; set; }
    }
}
